FROM python:3.11-rc-slim

RUN apt update && apt-get -y install gcc libffi-dev \
  &&  python -m pip install --upgrade pip setuptools --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple \
  &&  pip install certbot certbot-nginx certbot-dns-aliyun --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple \
  &&  rm -rf /var/cache/apt/archives/partial &&  rm -rf ~/.cache/pip 

ADD jre-8u333-linux-x64.tar.gz  /

WORKDIR jre1.8.0_333

RUN  rm -rf COPYRIGHT LICENSE README release THIRDPARTYLICENSEREADME-JAVAFX.txtTHIRDPARTYLICENSEREADME.txt Welcome.html \
  &&  rm -rf     lib/plugin.jar  \
   lib/ext/jfxrt.jar   \
   bin/javaws   \
   lib/javaws.jar  \ 
   lib/desktop  \ 
   plugin  \ 
   lib/deploy*  \ 
   lib/*javafx*  \ 
   lib/*jfx*  \ 
   lib/amd64/libdecora_sse.so  \ 
   lib/amd64/libprism_*.so   \
   lib/amd64/libfxplugins.so   \
   lib/amd64/libglass.so   \
   lib/amd64/libgstreamer-lite.so   \
   lib/amd64/libjavafx*.so  \ 
   lib/amd64/libjfx*.so  

ENV JAVA_HOME /jre1.8.0_333
ENV PATH ${PATH}:${JAVA_HOME}/bin
